home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
c
/
restracklib_0_2.lha
/
ResTrackLib
/
createport.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-07-31
|
2KB
|
89 lines
/* createport.c */
#include <stdio.h>
#include <exec/ports.h>
#include <clib/exec_protos.h>
#ifdef REGARGS
# include <pragmas/exec_pragmas.h>
#endif
#include "restrack_intern.h"
/*****************************************************************************
NAME
__rtl_CreateMsgPort -- allocate memory
SYNOPSIS
struct MsgPort * __rtl_CreateMsgPort (const char * file, int line);
FUNCTION
Stub for CreateMsgPort().
HISTORY
23. Jul 1994 Optimizer created
******************************************************************************/
struct MsgPort * __rtl_CreateMsgPort (const char * file, int line)
{
struct MsgPort * mp;
if ( (mp = CreateMsgPort ()) )
CHECK_ADD_RN(RTL_EXEC,RTLRT_MsgPort,mp,0)
return (mp);
} /* __rtl_CreateMsgPort */
/*****************************************************************************
NAME
__rtl_DeleteMsgPort
SYNOPSIS
void __rtl_DeleteMsgPort( struct MemHeader *freeList, APTR memoryBlock,
ULONG byteSize, const char * file, int line );
FUNCTION
Stub for FreeMem(). Frees a block of memory allocated by
__rlt_AllocMem().
HISTORY
23. Jul 1994 Optimizer created
******************************************************************************/
void __rtl_DeleteMsgPort (struct MsgPort * mp, const char * file, int line)
{
ResourceNode * node;
if ((node = FindResourceNode1 (mp)) )
{
if (node->Resource != RTLRT_MsgPort)
{
fprintf (stderr, "ERROR: DeleteMsgPort() at %s:%d called for\n",
file, line);
PrintResourceNode (node);
}
else
{
DeleteMsgPort (mp);
RemoveResourceNode (node);
}
}
else
CHECK_RT_ERROR_OR_CALL(RTL_EXEC,DeleteMsgPort,"(%p)",mp, DeleteMsgPort(mp))
} /* __rlt_DeleteMsgPort */
NRT_RET(struct MsgPort *,CreateMsgPort,(void),())
NRT(DeleteMsgPort,(struct MsgPort * mp),(mp))
/******************************************************************************
***** ENDE createport.c
******************************************************************************/